/*
 * ReportPDFGen.java
 * 
 * Created on 08.11.2007, 08:55:37
 * 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.googlecode.flightreports.countrysummary;

import com.googlecode.kohmori.reportgen.SimplePDFGenerator;
import com.googlecode.kohmori.springmvc.DefaultReportParams;
import javax.xml.transform.Transformer;

/**
 * This is an arbitrary subclassing of SimplePDFGenerator,
 * just being used here to show how you can pass report parameter
 * values to the stylesheet, to be used in generating the report. 
 * Parameters set here are matched in xslt:param elements in the
 * stylesheet, matched on the first argument of the setParameter()
 * method.
 * 
 * If you do not have any such xslt:param elements in your stylesheet,
 * you would *not* need to create this subclass--just rely on the
 * SimplePDFGenerator in your reports-servlet.xml Spring config 
 * file instead.
 * 
 */
public class ReportPDFGen extends SimplePDFGenerator {
    
    @Override
    protected void addTransformerParameters(Transformer transformer, 
            DefaultReportParams rP) {
        transformer.setParameter("report_title", 
                "Country Summary Report");
    }
   
}
